package com.eyevision.framework.utils

/**
 * Created by tom on 17/7/31.
 */
object SexUtil {

    fun toSexName(sexCode: String): String {

        return when (sexCode) {
            "1" -> "男"
            "2" -> "女"
            else -> "未知"
        }
    }

    fun toSexName(sexCode: Int): String {
        return when (sexCode) {
            1 -> "男"
            2 -> "女"
            else -> "未知"
        }
    }

    fun fmt2SexCode(sexName: String): String {
        return when (sexName) {
            "男" -> "1"
            "女" -> "2"
            else -> "-1"
        }
    }

    fun fmt2SexCodeInt(sexName: String): Int {
        return when (sexName) {
            "男" -> 1
            "女" -> 2
            else -> -1
        }
    }
}